import 'dart:math';

class CommonUtil {
  static String getCardImage(int index) {
    if (index > 29 || index <= 0 || index == 10 || index == 20) {
      index = 1;
    }
    return 'mahjong/card/south_hand_tile_$index.png';
  }

  static int generateCard() {
    var index = Random().nextInt(29) + 1;
    if (index > 29 || index <= 0 || index == 10 || index == 20) {
      index = 1;
    }
    return index;
  }
}
